﻿using GraphProcessor;
using IQIGame.Onigao.Logic;
using UnityEngine;

namespace IQIGame.Onigao.GamePlay.Editors
{
    [System.Serializable, NodeMenuItem(SkillEditorConst.SkillEffective + "/" + SkillEditorConst.Charge, typeof(SkillEditorGraph))]
    public class SkillEffectiveNode_Charge : SkillEffectiveNode
    {
        [InspectorName("蓄力持续回合")] public int chargeDuration = 1;
        [InspectorName("蓄力释放技能")] public int castSkill;
        [InspectorName("蓄力指示器预设")] public string chargePrefab;
        protected override ESkillEffectiveType effectType => ESkillEffectiveType.Charge;

        protected override SkillCustomConfig CreateConfig()
        {
            var rConfig = new SkillEffective_Charge_ConfigData()
            {
                chargeDuration = chargeDuration,
                castSkill = castSkill,
                chargePrefab = chargePrefab
            };
            return rConfig;
        }
    }
}